<template>
	<view>
		<uni-list>
			<uni-list-item :showArrow="false" title="所属机构" :rightText="userInfo.OrgID_Name" />
			<uni-list-item :showArrow="false" title="部门" :rightText="userInfo.DepartmentID_Name"/>
			<uni-list-item :showArrow="false" title="姓名" :rightText="userInfo.UserName"/>
			<uni-list-item :showArrow="false" title="注册时间" :rightText="userInfo.RegisterTime"/>
			<uni-list-item :showArrow="false" title="手机号" :rightText="userInfo.Mobile"/>
		</uni-list>
	</view>
</template>

<script>
	let pageApp = getApp();
	export default{
		data(){
			return{
				userInfo : {}
			}
		},
		onLoad:function(){
			// 准备请求数据
			let apiData = {
				url: pageApp.globalData.url + "/UserInfo",
				data: {
					"ID": uni.getStorageSync("userLoginData") ? JSON.parse(uni.getStorageSync("userLoginData")).UserID : 0
				},
				success: (d) => {
					if (d.data.code == "001") {
						this.userInfo = d.data.data;
					} else {
						uni.showToast({
							icon: "none",
							title: d.data.msg
						})
					}
				}
			}
			// 发送数据请求
			this.vjAjaxData(apiData);
		}
	}
</script>

<style>
	page{
		background-color: #F1F5F6;
	}
</style>
